<?php $this->rmenu = array(array('label'=>'Save'));?>
<?php 
	$this->beginWidget('application.widgets.report.makeReport');
?>
<table>
	<tbody>
		<tr>
			<td rowspan="3"><?php echo "This is the company Name"?></td>
			<td>Date: </td>
			<td><?php echo "19/08/2010"?></td>
		</tr>
		<tr>
			<td>Our Ref: </td>
			<td><?php echo "our Ref"?></td>
		</tr>
		<tr>
			<td>Delivery address</td>
			<td colspan="2"><?php echo "Delivery address"?></td>
		</tr>
	</tbody>
</table>
<?php 
	$datas=$dataProvider->getData();
	$totalPage = $dataProvider->getPagination()->getPageCount();
	for($i=0;$i<$totalPage;$i++):
		if($i>1){
			$dataProvder->getPagination()->setCurrentPage($i); 
			$datas = $dataProvider->getData(true);
		}		
?>
<table width="680px">
	<thead>
		<tr>
			<td width="50px">No.</td>
			<td width="200px">Marking</td>
			<td width="230px">Dimension</td>
			<td width="50px">Pkgs</td>
			<td width="150px">Weight</td>
		</tr>
	</thead>
	<tbody>
		<?php foreach($datas as $y=>$data):?>
		<tr>
			<td><?php echo $y+1;?></td>
			<td><?php echo $data->marking; ?></td>
			<td><?php echo $data->detail->length; ?> x <?php echo $data->detail->width;?> x <?php echo $data->detail->height; ?></td>
			<td><?php echo $data->detail->qty;?></td>
			<td><?php echo $data->detail->wt;?></td>
		</tr>
		<?php endforeach;?>
	</tbody>
</table>
<?php endfor;?>
<?php 
	$this->endWidget();
?>